<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>App管理</title>
    <link rel="shortcut icon" href="../../images/favicon.png"/>
    <link rel="stylesheet" href="../../vendors/iconfonts/mdi/css/materialdesignicons.min.css"/>
    <link rel="stylesheet" href="../../vendors/css/vendor.bundle.base.css"/>
    <link rel="stylesheet" href="../../css/style.css"/>
    <link rel="shortcut icon" href="../../images/favicon.png"/>
    <script type="text/javascript" src="../../js/Calendar.js"></script>

    <style type="text/css">
        #menu, #ac {
            list-style: none; /* 将默认的列表符号去掉 */
            padding: 0; /* 将默认的内边距去掉 */
            margin: 0; /* 将默认的外边距去掉 */
        }
        #ac li {
            float: left; /* 往左浮动 */
        }
        #anu{
            float: right;
        }
    </style>
</head>

<body>

<div calss="card-head">

    <h6 class="card-title">首页/运营管理/消息管理/App管理</h6>
    <div class="card">
    </div>
</div>
<div class="card-body">
    <div id="u17880" class="ax_default _默认样式">
        <div id="u17880_div" class=""></div>
        <div id="u17880_text" class="text ">
            <p style="font-size:18px;"><span
                    style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:12px;text-decoration:none;"> </span><span
                    style="font-family:'微软雅黑';font-weight:400;font-size:12px;text-decoration:none;">数据列表</span></p>
        </div>
    </div>
    <div id="anu">
        <button id="addDeptBtn" type="button" data-toggle="modal"
                data-target="#myModal">发布应用</button>
    </div>
    <table class="table table-info">
        <thead>
        <tr>
            <th>
                <input type="checkbox" id="chooseAll" style=" vertical-align: middle; margin-top: -13px;margin-left: 15px;" class="form-check-input"/>
            </th>
            <th>
                编号
            </th>
            <th>
                应用名称
            </th>
            <th>
                版本
            </th>
            <th>
                更新时间
            </th>
            <th>
                更新说明
            </th>
            <th>
                下载地址
            </th>
            <th>
                操作
            </th>
        </tr>
        </thead>
            <tbody>
            <tr th:attr="numId=${Appcation.numId}+'_row'" th:each="Appcation:${qryApplicationList}" class="table-warning">
                <th>
                <input type="checkbox" style=" vertical-align: middle; margin-top: -5px;margin-left: 15px;" class="form-check-input"/>
                </th>
                <th th:text="${Appcation.numId}"></th>
                <th th:text="${Appcation.appname}"></th>
                <th th:text="${Appcation.appbuild}"></th>
                <th th:text="${Appcation.apptime}"></th>
                <th th:text="${Appcation.appinstructions}"></th>
                <th th:text="${Appcation.download}"></th>
                   <th>
                    <a href="javascript:;" class="seeBtn"  id="seeBtn"  name="seeBtn" data-toggle="modal" data-target="#showSystemInfo" th:attr="numId=${Appcation.numId}">编辑</a>
                    <a href="javascript:;" class="delSystem" th:onclick="'del(this)'" th:attr="numId=${Appcation.numId}">删除</a></th>
            </tr>
            </tbody>
    </table>
    <!--<分页查询>-->
    <div class="page-bar">
        <ul class="page-num-ul clearfix">
            <li>共<span th:text="${page.totalCount }"></span>条记录&nbsp;&nbsp; <span th:text="${page.pageIndex}"></span>/<span th:text="${page.totalPageCount}"></span> 页</li>
            <button th:onclick="'javascript:pageQry(document.forms[0],1)'" th:if="${page.pageIndex gt 1 }">首页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex - 1}+')'"  th:if="${page.pageIndex gt 1 }">上一页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.pageIndex + 1}+')'" th:if="${page.pageIndex lt page.totalPageCount}">下一页</button>
            <button th:onclick="'javascript:pageQry(document.forms[0],'+${page.totalPageCount}+')'" th:if="${page.pageIndex lt page.totalPageCount}">最后一页</button>
            &nbsp;&nbsp;
        </ul>
        <span class="page-go-form"><label>跳转至</label>
             <input type="hidden" id="totalPageCount" th:value="${page.totalPageCount}"/>
             <input type="text" name="inputPage" id="inputPage" class="page-key"/>页
             <button type="button" class="page-btn"
                     th:onClick="'jumpPage(document.forms[0],document.getElementById(\''+inputPage+'\').value)'">GO</button>
		</span>
    </div>
    <!--&lt;!&ndash;</分页查询>&ndash;&gt;-->
    <!--&lt;!&ndash;新增&ndash;&gt;-->
    <!--&lt;!&ndash; 弹出层添加列表 &ndash;&gt;-->
    <!--<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">-->
        <!--<div class="modal-dialog" >-->
            <!--<div class="modal-content">-->
                <!--<div class="modal-header">-->
                    <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span-->
                            <!--aria-hidden="true">&times;</span></button>-->
                <!--</div>-->
                <!--<h4 class="modal-title text-center" id="myModalLabel">发布消息</h4>-->
                <!--<form class="forms-sample" id="editSystemFrom">-->
                    <!--<input type="hidden" id="sId" name="sId" value="0"/>-->
                    <!--<div class="modal-body">-->
                        <!--<div class="form-group">-->
                            <!--<label for="messageTitle" class="text-left">消息标题</label>-->
                            <!--<input type="text" name="messageTitle" class="form-control" id="messageTitle"-->
                                   <!--placeholder="请输入消息标题"/>-->
                        <!--</div>-->
                        <!--<input type="hidden" id="publisher" name="publisher" value="admin"/>-->
                        <!--<div class="form-group">-->
                            <!--<label for="messageContents" class="text-left">消息内容</label>-->
                            <!--<textarea class="form-control" name="messageContents" id="messageContents"-->
                                      <!--rows="4"></textarea>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="modal-footer">-->
                        <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>-->
                        <!--<button type="button" id="editBtn" class="btn btn-primary" data-dismiss="modal">保存-->
                        <!--</button>-->
                    <!--</div>-->
                <!--</form>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <!--&lt;!&ndash; /弹出层添加列表 &ndash;&gt;-->



    <!--新增-->
    <!--分页代码-->
</div>



<script src="../../vendors/js/vendor.bundle.base.js"></script>
<script src="../../vendors/js/vendor.bundle.addons.js"></script>
<script src="../../js/off-canvas.js"></script>
<script src="../../js/misc.js"></script>
<script src="../../js/dashboard.js"></script>

<script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
    //01.分页查询
    function pageQry(form, pageIndex) {
        $.ajax({
            url:"/lhuaw/getApplicationAll?currentPageNo="+pageIndex+"",
            type:"post",
            data:"page=1",
            success:function(){
                window.location.href="/lhuaw/getApplicationAll?currentPageNo="+pageIndex;
                // $("#Conframe").load("/lhuaw/getApplicationAll?currentPageNo="+pageIndex+"");
            },
            error:function () {
               alert("错误");
            }
        })
    }
    //02.跳转页查询
    function jumpPage(form, jumpPageIndex) {
        //01.数字校验
        var reg = /^[1-9]\d{0,}$/;
        if (!reg.test(parseInt(jumpPageIndex))) {
            alert("请输入合法的数字");
            return;
        }
        //02.范围校验：当前页不能大于总页数
        if (jumpPageIndex > document.getElementById("totalPageCount").value) {
            alert("已经是最后一页!");
            return;
        }
        $.ajax({
            type:"post",
            url:"/lhuaw/getApplicationAll?currentPageNo="+jumpPageIndex+"",
            data:"page=1",
            success: function(){
                window.location.href="/lhuaw/getApplicationAll?currentPageNo="+jumpPageIndex;
                // $("#Conframe").load("/lhuaw/getApplicationAll?currentPageNo="+jumpPageIndex+"");
            },
            error:function () {
                alert("错误");
            }
        })
    }
    //删除
    function del(ele) {
        var $ele =$(ele);
        var numId =$ele.attr('numId');
        $.ajax({
            "url":'/lhuaw/deleteStation/'+numId+"",
            "type":"get",
            "data":"",
            "dataType":"json",
            "success":function(data){
                alert("删除成功>>>");
                if(data.success) {
                    $("#" + numId + "_row").remove();
                    window.location.href="/lhuaw/getApplicationAll?currentPageNo=1";
                    // $("#Conframe").load("/lhuaw/getApplicationAll?currentPageNo=1");
                }else
                    alert("删除失败>>>>>>>");
            },
            "error":function(e){
                alert("ajax异常");
            }
        });
    }
    //删除

</script>


</body>
</html>